package com.ruoyi.manage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.EventManageMapper;
import com.ruoyi.manage.domain.EventManage;
import com.ruoyi.manage.service.IEventManageService;

/**
 * 事件管理Service业务层处理
 * 
 * @author liuyangyang
 * @date 2025-06-01
 */
@Service
public class EventManageServiceImpl implements IEventManageService 
{
    @Autowired
    private EventManageMapper eventManageMapper;

    /**
     * 查询事件管理
     * 
     * @param eventId 事件管理主键
     * @return 事件管理
     */
    @Override
    public EventManage selectEventManageByEventId(Long eventId)
    {
        return eventManageMapper.selectEventManageByEventId(eventId);
    }

    /**
     * 查询事件管理列表
     * 
     * @param eventManage 事件管理
     * @return 事件管理
     */
    @Override
    public List<EventManage> selectEventManageList(EventManage eventManage)
    {
        return eventManageMapper.selectEventManageList(eventManage);
    }

    /**
     * 新增事件管理
     * 
     * @param eventManage 事件管理
     * @return 结果
     */
    @Override
    public int insertEventManage(EventManage eventManage)
    {
        eventManage.setCreateTime(DateUtils.getNowDate());
        return eventManageMapper.insertEventManage(eventManage);
    }

    /**
     * 修改事件管理
     * 
     * @param eventManage 事件管理
     * @return 结果
     */
    @Override
    public int updateEventManage(EventManage eventManage)
    {
        eventManage.setUpdateTime(DateUtils.getNowDate());
        return eventManageMapper.updateEventManage(eventManage);
    }

    /**
     * 批量删除事件管理
     * 
     * @param eventIds 需要删除的事件管理主键
     * @return 结果
     */
    @Override
    public int deleteEventManageByEventIds(Long[] eventIds)
    {
        return eventManageMapper.deleteEventManageByEventIds(eventIds);
    }

    /**
     * 删除事件管理信息
     * 
     * @param eventId 事件管理主键
     * @return 结果
     */
    @Override
    public int deleteEventManageByEventId(Long eventId)
    {
        return eventManageMapper.deleteEventManageByEventId(eventId);
    }
}
